#pragma once

#include <vex/core/make_raw_handle.h>
#include <vex/functional/implementation/default_value.h>
#include <vex/functional/implementation/bs2_signal.h>
#include <vex/functional/implementation/invokable_signal_default_impl.h>

namespace vex { namespace functional {

    template<class TSignature>
    auto make_raw_invokable_signal(
        implementation::default_value<TSignature>&& p_default = implementation::default_value<TSignature>())
        -> implementation::invokable_signal_default_impl<
        TSignature, implementation::bs2_signal_traits<TSignature> 
        >*
    {
        return core::make_raw_handle< 
            implementation::invokable_signal_default_impl<
                TSignature, implementation::bs2_signal_traits<TSignature> 
            > 
        >(std::forward< implementation::default_value<TSignature> >(p_default));
    }
}}